﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PassengerFlowEnquiry.aspx.cs"
    Inherits="MTRC.ODMS.Web.SOM.PassengerFlow.PassengerFlowEnquiry" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls"
    TagPrefix="APJ" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<%@ Register Src="~/SOM/UserControl/PassengerSelectionCriteria.ascx" TagName="PSC"
    TagPrefix="UC" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <link href="~/CSS/Menu.css" rel="stylesheet" type="text/css" />
        <link id="cssWait" rel="stylesheet" type="text/css" />  <%-- add by gordon 20150812 | For Search Wait Cursor --%>
    <script src="../../Javascript/CommonFunction.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
    </AjaxControlToolkit:ToolkitScriptManager>
    <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
        <tr>
            <td colspan="2" class="Page_Head">
                <WebStructure:PageHead ID="PageHead" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="Page_Left">
                <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M1410" />
            </td>
            <td class="Page_Right">
                <table class="Page_Contents">
                    <tr>
                        <td class="TabStrip">
                            <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M141001" ParentMenuID="M1410" DMenuMode="CurrOnly"
                                runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Contents" style="height: 16px">
                            <!--********************************Put your contents here!********************************-->
                            <asp:UpdatePanel runat="server" ID="panelUP">
                                <Triggers>
                                    <asp:PostBackTrigger ControlID="btnExport" />
                                </Triggers>
                                <ContentTemplate>
                                    <fieldset style="clear: both; margin-bottom: 0px; background-color: #eeeeee;">
                                        <table  width="100%" height="130">
                                            <tr>
                                                <td>
                                                    <UC:PSC ID="ucPsc" runat="server" />
                                                </td>
                                                <td align="right"  valign="bottom">
                                                    <%-- update by gordon 20150812 | For Search Wait Cursor --%>
                                                    <%--<asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />&nbsp;--%>
                                                    <asp:Button ID="btnSearch" runat="server" Text="Search" OnClientClick="showWait('../../CSS/ForAdmRegWaitCursor.css')" OnClick="btnSearch_Click" />&nbsp;
                                                    <asp:Button ID="btnNew" runat="server" Text="Add New" OnClick="btnNew_Click" />&nbsp;
                                                    <%-- update by gordon 20150910| For Search Wait Cursor --%>
                                                    <%--<asp:Button ID="btnExport" runat="server" Text="Export" OnClick="btnExport_Click" />--%>
                                                    <asp:Button ID="btnExport" runat="server" Text="Export" OnClientClick="return ExportClick('../../CSS/ForAdmRegWaitCursor.css',this.id)" OnClick="btnExport_Click" />
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                    <table width="100%">
                                        <tr>
                                            <td>
                                                <APJ:CommonGridView ID="grdSearchResult" runat="server" AllowPaging="True" AllowSorting="True"
                                                    AscPic="~/Images/Common/arrow_up_green.png" AutoGenerateColumns="False" BorderColor="black"
                                                    CssClass="GridView" DescPic="~/Images/Common/arrow_down_green.png" BackColor="White"
                                                    BorderWidth="1px" OnRowDataBound="grdSearchResult_RowDataBound" DataKeyNames="PsgFlowID"
                                                    OnNeedDataBind="grdSearchResult_NeedDataBind" PageLinkCount="7">
                                                    <RowStyle CssClass="GridView_Row" />
                                                    <HeaderStyle CssClass="GridView_Header" BackColor="#D1F2FF" Font-Bold="True" Font-Names="Arial"
                                                        Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" Font-Underline="False"
                                                        ForeColor="#022D72" />
                                                    <AlternatingRowStyle CssClass="GridView_AlternativeRow" BackColor="Silver" />
                                                    <Columns>
                                                        <asp:TemplateField SortExpression="OperatingDay" HeaderText="SOM_PsgOperatingDay">
                                                            <ItemTemplate>
                                                                <%# "<a href='PassengerFlowEntry.aspx?psgFlowId=" + Eval("PsgFlowID") + "&psgLocationId="+Eval("LocationID")+"'>" + this.FormatDateTime(this.ConvertToDateTime(Eval("OperatingDay").ToString()),false,false) + "</a>"%>
                                                            </ItemTemplate>
                                                            <ItemStyle Width="100" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="Station" HeaderText="SOM_PsgStation" SortExpression="Station">
                                                            <ItemStyle Width="55" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="Description" HeaderText="SOM_PsgDescription" SortExpression="Description">
                                                            <ItemStyle Width="100" />
                                                        </asp:BoundField>
                                                        <asp:TemplateField HeaderText="SOM_PsgIncoming" SortExpression="Incoming">
                                                            <ItemTemplate>
                                                                <%# Eval("Incoming") == DBNull.Value ? "" : Convert.ToDecimal(Eval("Incoming")).ToString("N0") %>
                                                            </ItemTemplate>
                                                            <ItemStyle HorizontalAlign="Right" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="FlagEstIncoming" HeaderText="SOM_PsgInEst">
                                                            <ItemTemplate>
                                                                <%# Eval("FlagEstIncoming").ToString() == "" ? "" : Convert.ToBoolean(Eval("FlagEstIncoming")) ? "<input type='checkbox' checked='checked' disabled='disabled' />" : "<input type='checkbox' disabled='disabled' />"%>
                                                            </ItemTemplate>
                                                            <ItemStyle Width="50" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="SOM_PsgOutgoing" SortExpression="Outgoing">
                                                            <ItemTemplate>
                                                                <%# Eval("Outgoing") == DBNull.Value ? "" : Convert.ToDecimal(Eval("Outgoing")).ToString("N0")%>
                                                            </ItemTemplate>
                                                            <ItemStyle HorizontalAlign="Right" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="FlagEstOutgoing" HeaderText="SOM_PsgOutEst">
                                                            <ItemTemplate>
                                                                <%# Eval("FlagEstOutgoing").ToString() == "" ? "" : Convert.ToBoolean(Eval("FlagEstOutgoing")) ? "<input type='checkbox' checked='checked' disabled='disabled' />" : "<input type='checkbox' disabled='disabled' />"%>
                                                            </ItemTemplate>
                                                            <ItemStyle Width="50" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="SOM_PsgTSTTransit" SortExpression="TransitTST">
                                                            <ItemTemplate>
                                                                <%# Eval("TransitTST") == DBNull.Value ? "" : Convert.ToDecimal(Eval("TransitTST")).ToString("N0")%>
                                                            </ItemTemplate>
                                                            <ItemStyle HorizontalAlign="Right" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="FlagEstTransitTST" HeaderText="SOM_PsgFlagTSTTransit">
                                                            <ItemTemplate>
                                                                <%# Eval("FlagEstTransitTST").ToString() == "" ? "" : Convert.ToBoolean(Eval("FlagEstTransitTST")) ? "<input type='checkbox' checked='checked' disabled='disabled' />" : "<input type='checkbox' disabled='disabled' />"%>
                                                            </ItemTemplate>
                                                            <ItemStyle Width="50" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="SOM_PsgETSTransit" SortExpression="TransitETS">
                                                            <ItemTemplate>
                                                                <%# Eval("TransitETS") == DBNull.Value ? "" : Convert.ToDecimal(Eval("TransitETS")).ToString("N0")%>
                                                            </ItemTemplate>
                                                            <ItemStyle HorizontalAlign="Right" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField SortExpression="FlagEstTransitETS" HeaderText="SOM_PsgFlagETSTransit">
                                                            <ItemTemplate>
                                                                <%# Eval("FlagEstTransitETS").ToString() == "" ? "" : Convert.ToBoolean(Eval("FlagEstTransitETS")) ? "<input type='checkbox' checked='checked' disabled='disabled' />" : "<input type='checkbox' disabled='disabled' />"%>
                                                            </ItemTemplate>
                                                            <ItemStyle Width="50" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="LastUpdUser" HeaderText="SOM_PsgLastUpdUser" SortExpression="LastUpdUser">
                                                        </asp:BoundField>
                                                        <asp:TemplateField SortExpression="LastUpdTime" HeaderText="SOM_PsgLastUpdTime">
                                                            <ItemTemplate>
                                                                <%# this.FormatDateTime(this.ConvertToDateTime(Eval("LastUpdTime").ToString()), true)%>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <FooterStyle BackColor="White" ForeColor="#000066" />
                                                    <EmptyDataRowStyle CssClass="GridView_Header" />
                                                    <EmptyDataTemplate>
                                                        <asp:Table ID="Table1" runat="server" CssClass="GridView_Header_EmptyData">
                                                            <asp:TableRow ID="TableRow1" runat="server">
                                                                <asp:TableCell ID="TableCell1" runat="server" Style="border-right: black 1px solid;"
                                                                    Width="140px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell2" runat="server" Style="border-right: black 1px solid;"
                                                                    Width="80px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell3" runat="server" Style="border-right: black 1px solid;"
                                                                    Width="56px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell4" runat="server" Style="border-right: black 1px solid;"
                                                                    Width="56px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell5" runat="server" Style="border-right: black 1px solid;"
                                                                    Width="40px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell6" runat="server" Style="border-right: black 1px solid;"
                                                                    Width="60px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell7" runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell8" runat="server" Style="border-right: black 1px solid;"
                                                                    Width="40px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell9" runat="server" Style="border-right: black 1px solid;"
                                                                    Width="46px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell10" runat="server" Width="46px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell11" runat="server" Width="46px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell12" runat="server" Width="46px"></asp:TableCell>
                                                                <asp:TableCell ID="TableCell13" runat="server" Width="46px"></asp:TableCell>
                                                            </asp:TableRow>
                                                        </asp:Table>
                                                    </EmptyDataTemplate>
                                                    <PagerTemplate>
                                                        <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                                            <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                                                <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                                    <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                                    <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                                    &nbsp; &nbsp;
                                                                    <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                                    &nbsp;<asp:Label ID="Label1" runat="server">/</asp:Label>
                                                                    &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                                                </asp:TableCell>
                                                                <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                                    <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                                    &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                                        <asp:ListItem Value="5">5</asp:ListItem>
                                                                        <asp:ListItem Value="10">10</asp:ListItem>
                                                                        <asp:ListItem Value="15">15</asp:ListItem>
                                                                        <asp:ListItem Value="20">20</asp:ListItem>
                                                                        <asp:ListItem Value="25">25</asp:ListItem>
                                                                        <asp:ListItem Value="30">30</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </asp:TableCell>
                                                                <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                                    <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                                                </asp:TableCell>
                                                                <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                                    <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                                    </asp:Panel>
                                                                </asp:TableCell>
                                                                <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                                    <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                                                </asp:TableCell>
                                                            </asp:TableRow>
                                                        </asp:Table>
                                                    </PagerTemplate>
                                                </APJ:CommonGridView>
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                            <!--********************************Put your contents here!********************************-->
                        </td>
                    </tr>
                    <tr>
                        <td class="Page_Foot" style="height: 54px">
                            <WebStructure:PageFoot ID="PageFoot" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
